home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / VideoToolboxSources / GDInfo.h < prev    next >
Text File  |  1995-05-27  |  3KB  |  87 lines

  1. /*
  2. GDInfo.h
  3.  
  4. This structure is used by GDInfo.c, GDTestClut.c, and TimeVideo.c. The intent is
  5. to allow the test routines to accumulate all the test information in one
  6. convenient VideoInfo record that TimeVideo can then intelligently summarize in
  7. a useful report. All the information in the structures is stable, except the
  8. depth index "d". Call GDInfo() to update d after each call to SetDepth. 
  9.  
  10. 8/14/94 dgp in order to reduce size of VideoInfo struct, I changed doubles to floats
  11. and some shorts to Boolean. 
  12. */
  13.  
  14. #if __MWERKS__
  15.     // A temporary fix for Metrowerks CodeWarrior C version CW4.5. '/r' should work in version CW5.
  16.     #define BLANKLINE ""
  17. #else
  18.     #define BLANKLINE "\r"    "          " "          " "          " "          " \
  19.                             "          " "          " "          " "          " "\r"
  20. #endif
  21.  
  22. typedef struct {
  23.     // filled in by GDTestClut.c
  24.     struct{
  25.         float rgbGain[3][3];        // linear model for clut write-read transformation 
  26.         float rgbError[3];            // rms error of that linear model
  27.         float rgbErrorAtOnce[3];    // ", when we loaded whole clut at once
  28.         float tolerance;            // criterion used for calling a clut bad
  29.         short errors;                // error exceeded tolerance
  30.         short errorsAtOnce;            // ", when we loaded whole clut at once
  31.         Boolean doTest;
  32.         Boolean tested;
  33.         Boolean identity;            // gains correspond to identity transform, i.e. color mode
  34.     }read;
  35.     // filled in by GDTestClutHash in GDTestClut.c
  36.     struct{
  37.         short errors;
  38.         Boolean doTest;
  39.         Boolean tested;
  40.     }hash;                        // visible artifacts during clut loading
  41.     // filled in by GDTestClutVisually in GDTestClut.c
  42.     struct{
  43.         short errors;
  44.         short errorsAtOnce;
  45.         Boolean doTest;
  46.         Boolean tested;
  47.     }visual;                    // vs standard flags==0 cond.
  48. }VideoCardClutTest;
  49.  
  50. typedef struct {
  51.     GDHandle device;
  52.     Boolean basicTested,timeTested,clutTested;    // What's been tested.
  53.     // basicTest: these are filled in by GDInfo.c
  54.     Boolean setEntriesQuickly,gdGetEntries;        // compatibility
  55.     char cardName[64],driverName[64];
  56.     short slot,width,height,dacSize,dacMask;
  57.     struct{
  58.         short pixelSize;                        // zero if mode is invalid
  59.         short mode,clutSize,pages;
  60.         // Timing: these are filled in by GDInfoTime in GDInfo.c
  61.         short timeTested;
  62.         float frameRate,vblPerFrame;
  63.         float movieRate,movieRateQuickly;
  64.         float framesPerClutUpdate,framesPerClutUpdateHighPriority
  65.             ,framesPerClutUpdateQuickly;
  66.         float missingFramesPerClutUpdate,missingFramesPerClutUpdateHighPriority
  67.             ,missingFramesPerClutUpdateQuickly;
  68.         // These are filled in by GDTestClut.c
  69.         VideoCardClutTest clut[2][2];            // [quickly][isGray]
  70.     } depth[6];                                    // Indexed by d.
  71.     short d;                                    // current depth index
  72. } VideoInfo;
  73.  
  74. // GDInfo.c
  75. OSErr GDInfo(VideoInfo *card);
  76. OSErr GDInfoTime(VideoInfo *card);
  77.  
  78. // GDTestClut.c
  79. OSErr GDTestClut(FILE *o[2],short flags,VideoInfo *card);
  80. OSErr GDTestClutVisually(short flags,VideoInfo *card);
  81. OSErr SetEntriesQuicklyVsGDSetEntries(VideoInfo *card);
  82. OSErr GDTestClutHash(short flags,VideoInfo *card);
  83.  
  84. enum{testClutQuicklyFlag=1,testClutSeriallyFlag=2
  85.     ,testClutNegativeFlag=4,testClutLinearFlag=8
  86.     ,testClutVisually=16,testClutGains=32};
  87.